package com.yunxin.core.application.service;

import com.yunxin.core.application.command.user.UserAuthCommand;
import com.yunxin.core.application.command.user.UserRegisterCommand;
import com.yunxin.core.application.command.user.UserVisitorInfoCommand;
import com.yunxin.core.application.dto.user.UserAuthDTO;

/**
 * @author zero°
 * @since 2023-06-02
 */
public interface UserApplicationGatewayService {

    /**
     * 上报用户访问者信息
     * @param command command
     * @param clientIp clientIp
     */
    void reportUserVisitorInfo(UserVisitorInfoCommand command, String clientIp);


    /**
     * 用户注册
     * @param command command
     * @param clientIp clientIp
     * @return String
     */
    String userRegister(UserRegisterCommand command, String clientIp);

    /**
     * 用户授权
     * @param command command
     * @param clientIp clientIp
     * @return UserAuthDTO
     */
    UserAuthDTO userAuth(UserAuthCommand command, String clientIp);

    /**
     * 用户退出
     * @param visitorId visitorId
     * @param userCode userCode
     * @param clientIp clientIp
     */
    void userLogout(String visitorId, String userCode, String clientIp);
}
